const fs = require('fs')
const http = require('http')
const https = require('https')
const {creatProxyMiddleware}=require('http-proxy-middleware')
http.createServer((req,res)=>{
    if(req.url==='/'){
        let data = fs.readFileSync('./src/index.html')
        res.end(data)
    }
    else if(req.url.startsWith('/images')){
        let data = fs.readFileSync(('./src'+req.url))
        res.end(data)
    }
    else{
        let data = fs.readFileSync('./src'+req.url)
        res.end(data)
    }
    // res.end('ok')
    
    
}).listen(13000)